// ***********************************************************************
// Project			: Micua
// Assembly         : Micua.Model
// Author           : iceStone
// Created          : 2013-11-23 15:28
//
// Last Modified By : iceStone
// Last Modified On : 2014-01-04 20:39
// ***********************************************************************
// <copyright file="Post.cs" company="Wedn.Net">
//     Copyright (c) Wedn.Net. All rights reserved.
// </copyright>
// <summary>缺少注释</summary>
// ***********************************************************************

namespace Micua.Model
{
    using System;
    using System.Collections.Generic;
    
    /// <summary>
    /// 发表物 实体类.
    /// 文章、页面
    /// </summary>
    /// <remarks>
    ///  2013-11-18 19:40 Created By iceStone
    /// </remarks>
    public partial class Post
    {
        public Post()
        {
            this.Slug = string.Empty;
            this.AuthorName = string.Empty;
            this.Title = string.Empty;
            this.Content = string.Empty;
            this.Excerpt = string.Empty;
            this.Type = 0;
            this.Status = 0;
            this.CommentStatus = 0;
            this.PingStatus = 0;
            this.Pinged = string.Empty;
            this.Password = string.Empty;
            this.ViewCount = 0;
            this.CommentCount = 0;
            this.Metas = new HashSet<PostMeta>();
            this.ChlidPosts = new HashSet<Post>();
            this.Tags = new HashSet<Tag>();
            this.Categorys = new HashSet<Category>();
            this.Comments = new HashSet<Comment>();
        }
    
        /// <summary>
        /// 设置或读取发表物ID。
        /// </summary>
        /// <value>发表物ID.</value>
        public int Id { get; set; }
        /// <summary>
        /// 设置或读取别名。
        /// </summary>
        /// <value>别名.</value>
        public string Slug { get; set; }
        /// <summary>
        /// 设置或读取作者。
        /// </summary>
        /// <value>作者.</value>
        public string AuthorName { get; set; }
        /// <summary>
        /// 设置或读取标题。
        /// </summary>
        /// <value>标题.</value>
        public string Title { get; set; }
        /// <summary>
        /// 设置或读取发布时间。
        /// </summary>
        /// <value>发布时间.</value>
        public System.DateTime PubDate { get; set; }
        /// <summary>
        /// 设置或读取修改时间。
        /// </summary>
        /// <value>修改时间.</value>
        public System.DateTime Modified { get; set; }
        /// <summary>
        /// 设置或读取正文。
        /// </summary>
        /// <value>正文.</value>
        public string Content { get; set; }
        /// <summary>
        /// 设置或读取摘要。
        /// </summary>
        /// <value>摘要.</value>
        public string Excerpt { get; set; }
        /// <summary>
        /// 设置或读取类型。
        /// </summary>
        /// <value>类型.</value>
        public byte Type { get; set; }
        /// <summary>
        /// 设置或读取是否置顶。
        /// </summary>
        /// <value>是否置顶.</value>
        public bool IsTop { get; set; }
        /// <summary>
        /// 设置或读取发表状态。
        /// 0:公开发布;1:加密;2:私有;3:继承;4:回收站;5:自动草稿;6:草稿
        /// </summary>
        /// <value>发表状态.</value>
        public byte Status { get; set; }
        /// <summary>
        /// 设置或读取评论状态。
        /// 0:所有人可评论;1:注册用户可评论;2:不允许评论
        /// </summary>
        /// <value>评论状态.</value>
        public byte CommentStatus { get; set; }
        /// <summary>
        /// 设置或读取Ping状态。
        /// 0:允许;1:不允许
        /// </summary>
        /// <value>Ping状态.</value>
        public byte PingStatus { get; set; }
        /// <summary>
        /// 设置或读取Ping记录。
        /// </summary>
        /// <value>Ping记录.</value>
        public string Pinged { get; set; }
        /// <summary>
        /// 设置或读取访问密码。
        /// </summary>
        /// <value>访问密码.</value>
        public string Password { get; set; }
        /// <summary>
        /// 设置或读取浏览次数。
        /// </summary>
        /// <value>浏览次数.</value>
        public int ViewCount { get; set; }
        /// <summary>
        /// 设置或读取评论数量。
        /// </summary>
        /// <value>评论数量.</value>
        public int CommentCount { get; set; }
        /// <summary>
        /// 设置或读取用户ID。
        /// </summary>
        /// <value>用户ID.</value>
        public int UserId { get; set; }
        /// <summary>
        /// 设置或读取父发表物ID。
        /// </summary>
        /// <value>父发表物ID.</value>
        public Nullable<int> ParentId { get; set; }
    
        /// <summary>
        /// 设置或读取元数据集合。
        /// </summary>
        /// <value>元数据集合.</value>
        public virtual ICollection<PostMeta> Metas { get; set; }
        /// <summary>
        /// 设置或读取子发表物集合。
        /// </summary>
        /// <value>子发表物集合.</value>
        public virtual ICollection<Post> ChlidPosts { get; set; }
        /// <summary>
        /// 设置或读取父发表物。
        /// </summary>
        /// <value>父发表物.</value>
        public virtual Post ParentPost { get; set; }
        /// <summary>
        /// 设置或读取User.
        /// </summary>
        /// <value>User.</value>
        public virtual User User { get; set; }
        /// <summary>
        /// 设置或读取Tags.
        /// </summary>
        /// <value>Tags.</value>
        public virtual ICollection<Tag> Tags { get; set; }
        /// <summary>
        /// 设置或读取Categorys.
        /// </summary>
        /// <value>Categorys.</value>
        public virtual ICollection<Category> Categorys { get; set; }
        /// <summary>
        /// 设置或读取Comments.
        /// </summary>
        /// <value>Comments.</value>
        public virtual ICollection<Comment> Comments { get; set; }
    }
}
